package com.woniuxy.profile.mapper;

import com.woniuxy.commons.dto.BrowseDto;
import com.woniuxy.commons.dto.ScheduleDto;
import com.woniuxy.commons.entity.Browse;
import com.woniuxy.commons.entity.Schedule;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Author: dengzj
 * @Description:学习进度
 * @Date: Created in 15:08 2020/7/29
 */
@Mapper
@Repository
public interface ScheduleMapper {
    /*
     *@Author: dengzj
     *@Description: 根据id查找学习进度
     *@Date: 10:06 2020/7/30
     */
    //List<Schedule> findSchedule(@Param("uid") int uid, @Param("index") int index, @Param("pageSize") int pageSize);
    List<Schedule> findSchedule(ScheduleDto scheduleDto);
    /*
    *@Author: dengzj
    *@Description:根据id查询所有学习课程
    *@Date: 11:03 2020/8/1
    */
    int countOfSchedule(int uid);
    /*
    *@Author: dengzj
    *@Description: 浏览记录
    *@Date: 10:42 2020/7/30
    */
    //List<Browse> findBrowse(@Param("uid") int uid,@Param("index") int index,@Param("pageSize") int pageSize);
    List<Browse> findBrowse(BrowseDto browseDto);
    /*
    *@Author: dengzj
    *@Description: 浏览记录总条数
    *@Date: 11:25 2020/8/1
    */
    int countOfBrowse(int uid);
    /*
    *@Author: dengzj
    *@Description: 学习时长排行榜
    *@Date: 16:29 2020/8/1
    */
    List<ScheduleDto> findStudyTime(ScheduleDto scheduleDto);
}
